![]() |
PBHOpenDFAsync |
||||
Header: | Files.h | Carbon status: | Supported | |
Opens the data fork of a file.
OSErr PBHOpenDFAsync ( HParmBlkPtr paramBlock );
A pointer to a basic HFS parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion function.
On output, the result code of the function.
On input, a pointer to a pathname.
On input, a volume specification.
On output, a file reference number.
On input, the read/write permission.
On input, a parent directory ID.
The PBHOpenDFAsync function creates an access path to the data fork of a file. PBHOpenDFAsync is exactly like the PBHOpenAsync function except that PBHOpenDFAsync allows you to open a file whose name begins with a period (.).
You can open a path for writing even if it accesses a file on a locked volume, and no error is returned until a PBWriteAsync, PBSetEOFAsync, or PBAllocateAsync call is made.
If you attempt to open a locked file for writing, PBHOpenDFAsync returns the result code permErr. If you request exclusive read/write permission but another access path is already open, PBHOpenDFAsync returns the reference number of the existing access path in ioRefNum and opWrErr as its function result. You should not use this reference number unless your application originally opened the file.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)